import request from '@/util/request.js'
// 创建排队
export const addEstablish = (body) => request({
  url: '/qichong-record/api/marketing/queuing/create',
  method: 'post',
  data: body
})

// 获取排队
export const getEstablish = (shopId) => request({
  url: '/qichong-record/api/marketing/queuing/num',
  params: {
    shopId
  }
})

//刷新排队数量
export const refreshEstablish = (shopId) => request({
  url: '/qichong-record/api/marketing/queuing/refreshQueuingCount',
  params: {
    shopId
  }
})

//重新获取排队号码
export const anewEstablish = (shopId) => request({
  url: '/qichong-record/api/marketing/queuing/resetNum',
  params: {
    shopId
  }
})

// 下一个
export const nextEstablish = (previousId,shopId) =>request({
  url:'/qichong-record/api/marketing/queuing/next',
  params:{
    previousId,
    shopId
  }
})

// 叫号
export const CallNumber = (queuingUserId) =>request({
  url:'/qichong-record/api/marketing/queuing/calling',
  method:'post',
  params:{
    queuingUserId
  }
})

// 店员获取排队
export const getSalesclerk = (shopId)  =>request({
  url:'/qichong-record/api/marketing/queuing/detail',
  params:{
    shopId
  }
})
